package com.handsome.组合模式;

/**
 * @author niechun
 * @date 2023/3/1 20:45
 */
public class Client {
    public static void main(String[] args) {
        //学校
        OrganizationComponent university=new University("清华大学","顶级大学");
        //学院
        OrganizationComponent college=new College("计算机学院","计算机学院");
        OrganizationComponent college2=new College("美术与设计学院","美术与设计学院");
        //专业
        OrganizationComponent department=new Department("计算机科学与技术","不错的专业");
        OrganizationComponent department1=new Department("信息工程","不错的专业");
        OrganizationComponent department2=new Department("网络工程","不错的专业");
        college.add(department);
        college.add(department1);
        college.add(department2);

        OrganizationComponent department3=new Department("工业设计","不错的专业");
        OrganizationComponent department4=new Department("产品设计","不错的专业");
        OrganizationComponent department5=new Department("视觉传达","不错的专业");
        college2.add(department3);
        college2.add(department4);
        college2.add(department5);

        university.add(college);
        university.add(college2);

        university.print();

    }
}
